home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 22 / AACD 22.iso / AACD / Online / Apache / include / php / ext / standard / url_scanner.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-19  |  1.8 KB  |  55 lines

  1. /*
  2.    +----------------------------------------------------------------------+
  3.    | PHP version 4.0                                                      |
  4.    +----------------------------------------------------------------------+
  5.    | Copyright (c) 1997, 1998, 1999, 2000 The PHP Group                   |
  6.    +----------------------------------------------------------------------+
  7.    | This source file is subject to version 2.02 of the PHP license,      |
  8.    | that is bundled with this package in the file LICENSE, and is        |
  9.    | available at through the world-wide-web at                           |
  10.    | http://www.php.net/license/2_02.txt.                                 |
  11.    | If you did not receive a copy of the PHP license and are unable to   |
  12.    | obtain it through the world-wide-web, please send a note to          |
  13.    | license@php.net so we can mail you a copy immediately.               |
  14.    +----------------------------------------------------------------------+
  15.    | Author: Sascha Schumann <sascha@schumann.cx>                         |
  16.    +----------------------------------------------------------------------+
  17.  */
  18. /* $Id: url_scanner.h,v 1.8 2000/09/19 17:21:26 sas Exp $ */
  19.  
  20. #ifndef URI_SCANNER_H
  21. #define URI_SCANNER_H
  22.  
  23. PHP_RINIT_FUNCTION(url_scanner);
  24. PHP_RSHUTDOWN_FUNCTION(url_scanner);
  25.  
  26. char *url_adapt(const char *src, size_t srclen, const char *data, size_t *newlen);
  27.  
  28. enum url_state { 
  29.     STATE_NORMAL, 
  30.     STATE_TAG_START, 
  31.     STATE_TAG, 
  32.     STATE_IN_TAG, 
  33.     STATE_TAG_ATTR, 
  34.     STATE_TAG_IS, 
  35.     STATE_TAG_IS2, 
  36.     STATE_TAG_VAL, 
  37.     STATE_TAG_VAL2, 
  38.     STATE_TAG_QVAL1,
  39.     STATE_TAG_QVAL2, 
  40.     STATE_TAG_QVAL2b 
  41. };
  42.  
  43. typedef struct url_adapt_struct {
  44.      enum url_state state;
  45.     char *tag;
  46.     char *attr;
  47.     char *val;
  48.     char delim;
  49.     char *p;
  50.     int l,ml;
  51.     int attr_done;
  52. } url_adapt_state_t;
  53.  
  54. #endif
  55.